{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "pip install arch==4.7.0 -i https://pypi.douban.com/simple\n",
    "\n",
    "pip install scipy==1.1.0 -i https://pypi.douban.com/simple\n",
    "\n",
    "numpy:1.15.4\n",
    "\n",
    "pip install numpy==1.15.4 -i https://pypi.douban.com/simple"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## 6.1 HFDataviewSignalDigger\n",
    "\n",
    "6.1.1 读取数据HFData1M，并转换成jaqs需要的数据格式，将数据合成30分钟，将数据导入HFDataView\n",
    "\n",
    "6.1.2 使用30分钟的数据，用talib计算close的EMA和STDDEV（标准差），只展示去除停牌时间后的图\n",
    "\n",
    "dv.add_formula('name', \"Ta('Function',0,open, high, low, close, volume,N)\",add_data=True)\n",
    "\n",
    "如果要计算ema和标准差，替换一下function即可，但是需要注意，name的名字定义不能和function一致，否则会报错，导致不能调用算法，尽量修改成其他的名字。\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6.2 平稳性\n",
    "\n",
    "6.2.1 读取HFData10M数据，检验原始数据平稳性和p-value\n",
    "\n",
    "6.2.2 对数据进行差分处理，检验差分平稳性和p-value\n",
    "\n",
    "要求：使用ARIMA模型课件中的差分方式\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6.3 自相关\n",
    "\n",
    "6.3.1 绘制ACF和PACF"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6.4 ARIMA模型\n",
    "\n",
    "6.4.1对差分后的数据进行aic/bic定阶，其中设置max_ar=6,max_ma=3，根据得到的阶数计算模型的得分\n",
    "\n",
    "6.4.2 对arma的残差进行分析，绘制ACF、PACF；观察预测值与实际值、拟合的值与训练值\n",
    "\n",
    "6.4.3 用ARIMA模型进行预测。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6.5 AR(p)+GARCH(1, 1)模型\n",
    "\n",
    "6.5.1 观察残差平方的自相关性\n",
    "\n",
    "6.5.2 根据前面获得的AR模型，得到lags的阶数，构建AR(p)+GARCH(1, 1)模型\n",
    "\n",
    "6.5.3 输出模型滚动预测的均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
